package com.example.sxt_practise.GOF23.proxypattern.dynamicproxy;

import java.lang.reflect.Proxy;

/**
 * @author gaofeng
 * @date 2022年05月22日 10:58
 */
public class Client {
    public static void main(String[] args) {
        Star realStar = new RealStar() ;
        StarHandler handler = new StarHandler(realStar) ;

        Star proxyInstance = (Star) Proxy.newProxyInstance(ClassLoader.getSystemClassLoader(), new Class[]{Star.class}, handler);
        proxyInstance.sing();

    }
}
